package com.tianlu.store.service;

import com.tianlu.store.dto.ScoreDetailDTO;
import com.tianlu.store.dto.TeamPerformanceDTO;
import com.tianlu.store.dto.UpdatePasswordDTO;
import com.tianlu.store.entity.ScoreDetail;
import com.tianlu.store.entity.UserInfo;
import com.tianlu.store.common.MyBaseService;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Author 梁东烂
 * @Desc 用户表(UserInfo)表服务接口
 * @Date 2023-04-01 17:28:49
 */
public interface UserInfoService extends MyBaseService<UserInfo> {
    /**
     * 修改余额
     *
     * @param id    用户id
     * @param score 积分余额
     * @author liangdl
     * @since 2023/4/4 10:37
     */
    void updateScore(Long id, BigDecimal score);

    List<UserInfo> findGroupTree(Long id);

    UserInfo getByPhone(String phone);

    UserInfo getByCode(String code);

    UserInfo wxLogin(String code);

    String getPhoneNumber(String code);

    UserInfo signUp(UserInfo userInfo);

    List<UserInfo> findByIds(String ids);

    void giveScore(Long userId, Long receiveId, BigDecimal score);

    void resettingFreeFlag();

    List<ScoreDetailDTO> findScoreDetail(Long userId);

    List<TeamPerformanceDTO> findPerformanceDetail(Long userId);

    List<UserInfo> findTeamMembers(Long id);

    Boolean updatePassword(UpdatePasswordDTO updatePasswordDTO);
}
